<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .hide {
            display: none;
        } 
        .show {
            display: block;
        }
    </style>
</head>
<body>
    <!-- 7. `<div class="erweima hide" id="er">`，
        将class的属性值中的hide更换为show，
        其他保持不变，请写出适合的方法。 -->
    <input type="button" value="显示二维码" id="showBtn">
    <div class="erweima hide" id="er">        
        <img src="./456.png" alt="">
    </div>
    <script src="common.js"></script>
    <script>
        // 思路：利用点击按钮将二维码进行展示，hide的属性变为show，从而显示二维码
        //获取元素
        var showBtn = my$("showBtn");
        var er = my$("er");
        // 鼠标移上出现二维码
        showBtn.onmouseover = function () {
            er.className = "erweima show";
        };
        showBtn.onmouseout = function () {
            er.className = "erweima hide";
        };
    </script>
</body>
</html>